import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class LoginServlet extends HttpServlet
{
	public void doPost(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException
	{
		res.setContentType("text/html");
		PrintWriter out=res.getWriter();
		String uname=req.getParameter("uname");
		String upwd=req.getParameter("upwd");
		LoginBean lb=new LoginBean();
		String status=lb.checkLogin(uname,upwd);
		out.println("<html>");
		out.println("<body bgcolor='lightyellow'><center><b>");
		out.println("<font size='7' color='red'><br><br>");
		if(status.equals("success"))
		{
			out.println("Login success");
		}
		else
		{
			out.println("Login failure");
		}
		out.println("</font></b></center></body></html>");
	}
}
